package cn.wolfcode.web.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.Product;
import cn.wolfcode.service.IProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/product")
@Slf4j
public class ProductFeignClient {
    @Autowired
    private IProductService productService;
    @RequestMapping("/queryByIds")
    Result<List<Product>> queryByIds(@RequestParam  List<Long> ids){
        List<Product> list=  productService.getByIds(ids);
        return Result.success(list);
    }
}
